<html>
    <head>
        <link rel="stylesheet" type="text/css" href="./conf/style.css" />
        <script type="text/javascript" src="./script/ValidarCpf.js" ></script>
        <title>.: Conectado ao Banco de Dados :.</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>

        <?php
        include './conf/conection.php';

        $sql = "SELECT id, nome, cpf, email FROM $table ORDER BY id";
        $result = mysql_query($sql);

        ?>        

        <div>
            <form action="modify.php" method="POST" name="modifyForm">
                ID: <input type="text" name="id" />
                Nome: <input type="text" name="nome" />
                E-mail: <input type="text" name="email" />
                CPF: <input type="text" name="cpf" onblur="ValidarCpf(this)" />
                Senha: <input type="password" name="senha" />
                <input type="submit" name="botao" value="Incluir" />
                <input type="submit" name="botao" value="Editar" />
                <input type="submit" name="botao" value="Excluir" /><br/>
                <input type="reset" name="cancelar" value="Limpar" />
            </form>
        </div><br/><br/>

        <hr/>
        <h2>Dados gravados na Tabela</h2><br/><br/>

        <div id="DBdata">
            <?
            /* Mostrando os resultados em HTML */
            echo "<table>\n";
                echo "<th>ID</th><th>Nome</th>\t<th>CPF</th>\t<th>E-mail</th>";
                while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
                echo "\t<tr>\n";
                    foreach ($line as $value) {
                    echo "\t\t<td>$value</td>\n";
                    }
                    echo "\t\t</tr>\n";
                }
                echo "</table>\n";

            // Libera o conjunto de resultados
            mysql_free_result($result);

            // Fechando a conexão
            mysql_close($con);
            ?>
        </div>
        <br/><br/><br/><br/><br/>
        <a href="/~guilhermesg" target="_self">Votar para a Página de Projetos</a>
    </body>
</html>